<?php

namespace App\Providers;

use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Hashing\Hasher;

class H5ServiceProvider implements UserProvider
{
    protected $model;
    protected $hasher;

    public function __construct(Hasher $hasher, $model)
    {
        $this->model = $model;
        $this->hasher = $hasher;
    }

    public function retrieveById($identifier)
    {
        // 通过 ID 获取用户
    }

    public function retrieveByToken($identifier, $token)
    {
        // 通过 token 获取用户
    }

    public function updateRememberToken(Authenticatable $user, $token)
    {
        // 更新 remember_token
    }

    public function retrieveByCredentials(array $credentials)
    {
        // 通过用户名和密码获取用户
    }

    public function validateCredentials(Authenticatable $user, array $credentials)
    {
        // 验证用户凭证
    }
}